MUDUO_DIRECTORY ?= $(HOME)/lib/build/release-install-cpp11
MUDUO_INCLUDE = $(MUDUO_DIRECTORY)/include
MUDUO_LIBRARY = $(MUDUO_DIRECTORY)/lib

CXXFLAGS = -I$(MUDUO_INCLUDE) \
	       -std=c++11 \
		   -w

LDFLAGS = -L$(MUDUO_LIBRARY) -lmuduo_net -lmuduo_base -lpthread -lrt -lz -ljsoncpp

all: registry provider consumer server client 
clean:
	rm registry provider consumer server client

server: server.cc
	g++ $(CXXFLAGS) -o $@ $^ $(LDFLAGS) -g

client: client.cc
	g++ $(CXXFLAGS) -o $@ $^ $(LDFLAGS) -g